package main

import (
	"Ginproject/PwdLearn/base64/utils"
	"fmt"
)

func main() {
	// base64测试
	src := "hello"
	ret := utils.Base64Encoding(src)
	fmt.Println(ret)

	ret, err := utils.Base64decoding(ret)

	if err != nil {
		fmt.Printf("解码发生错误了{err}")
	} else {
		fmt.Println(ret)
	}
	fmt.Println("=========================")
	url := "http://127.0.0.1:5000/?name=Jackson"

	url_encode := utils.Base64UrlEncoding(url)
	fmt.Println(url_encode)

	// ret, err := utils.Base64decoding(ret)
	url_decode, err := utils.Base64Urldecoding(url_encode)

	if err != nil {
		fmt.Printf("解码错误:{err}")
	} else {
		fmt.Println(url_decode)
	}

}
